Name | Type | Length | IsNullable | Collation |
OrderID | int | 4 | ![]() | |
ProductID | int | 4 | ![]() | |
ProductName | nvarchar | 80 | ![]() | SQL_Latin1_General_CP1_CI_AS |
ProductName | sysname | 80 | ![]() | SQL_Latin1_General_CP1_CI_AS |
UnitPrice | money | 8 | ![]() | |
Quantity | smallint | 2 | ![]() | |
Discount | real | 4 | ![]() | |
ExtendedPrice | money | 8 | ![]() |
create view "Order Details Extended" AS
SELECT "Order Details".OrderID, "Order Details".ProductID, Products.ProductName,
"Order Details".UnitPrice, "Order Details".Quantity, "Order Details".Discount,
(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice
FROM Products INNER JOIN "Order Details" ON Products.ProductID = "Order Details".ProductID
--ORDER BY "Order Details".OrderID